/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_downloadlog")
//@NamedQueries({@NamedQuery(name = "TDownloadlog.findAll", query = "SELECT t FROM TDownloadlog t"), @NamedQuery(name = "TDownloadlog.findById", query = "SELECT t FROM TDownloadlog t WHERE t.id = :id"), @NamedQuery(name = "TDownloadlog.findByMobile", query = "SELECT t FROM TDownloadlog t WHERE t.mobile = :mobile"), @NamedQuery(name = "TDownloadlog.findByDownloadtime", query = "SELECT t FROM TDownloadlog t WHERE t.downloadtime = :downloadtime"), @NamedQuery(name = "TDownloadlog.findByContentid", query = "SELECT t FROM TDownloadlog t WHERE t.contentid = :contentid"), @NamedQuery(name = "TDownloadlog.findBySourceid", query = "SELECT t FROM TDownloadlog t WHERE t.sourceid = :sourceid"), @NamedQuery(name = "TDownloadlog.findByFlag", query = "SELECT t FROM TDownloadlog t WHERE t.flag = :flag"), @NamedQuery(name = "TDownloadlog.findByUa", query = "SELECT t FROM TDownloadlog t WHERE t.ua = :ua")})
public class TDownloadlog implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Column(name = "mobile")
    private String mobile;
    @Column(name = "downloadtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date downloadtime;
    @Column(name = "contentid")
    private BigInteger contentid;
    @Column(name = "sourceid")
    private BigInteger sourceid;
    @Column(name = "flag")
    private Integer flag;
    @Column(name = "ua")
    private String ua;

    public TDownloadlog() {
    }

    public TDownloadlog(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Date getDownloadtime() {
        return downloadtime;
    }

    public void setDownloadtime(Date downloadtime) {
        this.downloadtime = downloadtime;
    }

    public BigInteger getContentid() {
        return contentid;
    }

    public void setContentid(BigInteger contentid) {
        this.contentid = contentid;
    }

    public BigInteger getSourceid() {
        return sourceid;
    }

    public void setSourceid(BigInteger sourceid) {
        this.sourceid = sourceid;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getUa() {
        return ua;
    }

    public void setUa(String ua) {
        this.ua = ua;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TDownloadlog)) {
            return false;
        }
        TDownloadlog other = (TDownloadlog) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TDownloadlog[id=" + id + "]";
    }

}
